{#
A free text question.
{
   question: a html question,
   is_activity: True if the question is part of an activity
   show_answer_prompt: Set to the value of the show answer prompt (must be an activity)
   answer_prompt: set to the answer prompt itself
   checkanswers : [
       {
          regex : A regex to match the correct answer,
          correct_answer: Feedback if the regex matches (optional),
          incorrect_answer: Feedback if the regex does not match (optional),
       }
   ]

#}

<div class="gcb_q_free_text_container" >
    <div class="gcb_a_editable_area" gcb-a-action="/editor/{{ activity.id }}/activity/question/" >{{ activity.question }}</div>
	<input type="text" style="width: 400px;" class="gcb_q_answer alphanumericOnly" "/>
	{# Output the Check answers #}
	{% if activity.is_activity %}
		{% for checkanswer in activity.checkanswers %}
		<div class="gcb_q_hidden gcb_q_checkanswers" regex="{{ checkanswer.regex }}" {% if checkanswer.regex_flags %}regex_flags="{{ checkanswer.regex_flags }}"{% endif %}>
		   {% if checkanswer.correct_answer %}
		      <div class="gcb_q_correct_answer gcb_a_editable" gcb-a-action="/editor/{{ activity.id }}/activity/todo/" >{{ checkanswer.correct_answer }}</div>
		   {% endif %}
		   {% if checkanswer.incorrect_answer %}
		      <div class="gcb_q_incorrect_answer gcb_a_editable" gcb-a-action="/editor/{{ activity.id }}/activity/todo/" >{{ checkanswer.incorrect_answer }}</div>
		   {% endif %}
		</div>
		{% endfor %}
	    <ul class="gcb_q_answer" >
		  <li><a class="gcb-button gcb-button-primary gcb_q_check_answer"  >Check Answer</a></li>
		  <li>
		  	<div class="gcb_q_feedback_box"></div>
		  </li>
	    </ul>
	    {% if activity.show_answer_prompt %}
	    <ul>
			<li><a class="gcb-button gcb-button-primary gcb_q_show_answer_prompt gcb_a_editable" gcb-a-action="/editor/{{ activity.id }}/activity/show_answer_prompt/" >{{ activity.show_answer_prompt }}</a></li>
			<li><div class="gcb_q_hidden gcb_q_answer_prompt gcb_a_editable" gcb-a-action="/editor/{{ activity.id }}/activity/answer_prompt/" >{{ activity.answer_prompt }}</div></li>
		</ul>
		{% endif %}
    {% endif %}
</div>

